Cellphone Price Prediction

Business Case

*In this project on the basis of mobile specification like Battery power, 3G enabledwifi, Bluetooth, Ram etc we are predicting Price range of the mobile

*Below short description on the main contents

*Battery_power : Total energy a battery can store in one time measured in mAh

*blue : Has bluetooth or not

*clock_speed : speed at which microprocessor executes instructions

*dual_sim : Has dual sim support or not

*fc : Front Camera mega pixels

*four_g : Has 4G or not

*int_memory : Internal memory in Gigabytes

*m_dep :mobile depth in cm

*mobile_wt : weight of mobile phone

*n_cores : Number of cores of processor

*pc : Primary camera mega pixels

*px_height : Pixel resolution height

*px_width : Pixel resolution width

*ram : Random access memory in Megabytes

*sc_h : Screen Height of mobile in cm

*sc_w : Screen width of mobile in cm

*talk_time : longest time that a single battery charge will last when you are.

*three_g : Has 3G or not

*touch_screen : Has touch screen or not

*wifi : Has wifi or not

Exploratory Data Analysis

Yes ! Battery Power we can see variance according to the price

Costly Phones are Lighter

Internal Memories dependeds upon Phone price here we can see expandable memomy according to high price

Mega fixels should be vary according to price but here we can see bit variance on last one

Data Preprocessing

Handling outliers

We can see above fc we have outliers hence we need to clear the outliers

Feature selection

Model Creation

* Here we need to predict price range of the new mobile phone hence we are going to implement below algorithms ** Logistic regression ** Support Vector Machin ** Decision Tree Classifier ** Random Forest Classifier ** XGboost regression

Logistic Regression

There are two possibilities from here :

SVM

SVM most of the cases only for Classification problems.. Just we try and see how it will goes.

Here we can excellent result obtained by SVM

Decision Tree Classifier

Here we are going to use not scaled data X_train,X_test, y_test and y_train because decision tree do not require feature scaling to be perofomed as they are not sensitive to variance the data

Let's tune some hyperparameters of decision tree classifier:

Decision Tree classifier-Observation

Random Forest

Evaluation metrcis

Here we can see our model is overfitted so we are moving to next algirithm

XGBoost Classifier

with default hyperparameters

Train accuracy is 100% and Test Accuracy is 91%

Comparision

As above we can see Random forest classifier and XGboost models are overfitted hence we are putting two models out of consideration

Conclusion

Logistic Regression and Support vector Machine have really tough competation

Ram, Battery power, Mobile weight, Screen size and Pixels are key features in predicting the mobile price range

As per the observation we have experiments some models and we can conclude that Logistic and SVM without using hyperparameters we got the best results.